#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QLabel>
#include <QProgressBar>
#include <QPushButton>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QStatusBar* statusBar = this->statusBar();

    this->setStatusBar(statusBar);

    QLabel* label = new QLabel("这是一个QLabel");
    statusBar->addWidget(label);
    QProgressBar* progressBar = new QProgressBar();
    progressBar->setRange(0, 100);
    progressBar->setValue(50);
    statusBar->addWidget(progressBar);

    QPushButton* button = new QPushButton("按钮");
    statusBar->addPermanentWidget(button);


}

MainWindow::~MainWindow()
{
    delete ui;
}

